package com.ecoolex.chinadutyfree.retailer.job.scheduler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import com.ecoolex.chinadutyfree.retailer.core.manager.UserOrderDataManager;
import com.ecoolex.framework.scheduler.Job;
import com.ecoolex.framework.scheduler.JobComponent;

@JobComponent
public class UserOrderDataJob {
	private Logger log = LoggerFactory.getLogger(UserOrderDataJob.class);
	
	@Autowired
	private UserOrderDataManager userOrderDataManager;
	
	@Job(name="chinadutyfree.UserOrderDataJob.userOrderStatistical",describe = "用户订单增量统计")
	public void userOrderStatisticalProcess() {
		log.info("用户订单调度={}", UserOrderDataJob.class);
		try {
			userOrderDataManager.userOrderData(this.getClass().getSimpleName());
		} catch (Exception e) {
			log.error("用户订单数据调度异常", e);
		} finally {
			log.info("调度结束={}", UserOrderDataJob.class);
		}
	}
}
